package com.hung.pro.iFlashCards.bean;

/**
 * Card Definition.
 * User: hung
 * Date: 2008/05/01
 * Time: 10:33:20
 * To change this template use File | Settings | File Templates.
 */
public class CardBean {

    /**
     * ID
     */
    private int id;
    private int lexiconId;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    /**
     * Vocabulary word
     */
    private String strWord;

    /**
     * Mean of word
     */
    private String strMeaning;

    /**
     * some examples that using word
     */
    private String strExample;

    /**
     * the reading of word, katakana, hiragana,..., whatever that show you how to read the word
     */
    private String strReading;

    /**
     * some note about the word, what funny thing you can image about this word<br>
     * the more fun you image about the word, the longer you can remember
     */
    private String strNote;

    /**
     * status, status = 0 -> not learned, status = 1 -> you remembered, 2 -> you did not remember
     */
    int status;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    /**
     * Constructor with member initialized
     *
     * @param id         id
     * @param strWord    Word
     * @param strMeaning Meaning of the word
     * @param strExample Example of the word
     * @param strReading How to read the word
     * @param strNote    Note about the word
     * @param lexiconId  lexicon id
     */
    public CardBean(int id,
                    int lexiconId,
                    String strWord,
                    String strMeaning,
                    String strExample,
                    String strReading,
                    String strNote) {
        this.strWord = strWord;
        this.strMeaning = strMeaning;
        this.strExample = strExample;
        this.strReading = strReading;
        this.strNote = strNote;
        this.lexiconId = lexiconId;
        this.id = id;
        this.status = Status.NOT_LEARNT;
    }

    public CardBean(int lexiconId, String strWord, String strMeaning, String strExample, String strReading, String strNote) {
        this.lexiconId = lexiconId;
        this.strWord = strWord;
        this.strMeaning = strMeaning;
        this.strExample = strExample;
        this.strReading = strReading;
        this.strNote = strNote;
        this.id = -1;
        this.status = Status.NOT_LEARNT;
    }

    /**
     * Default Constructor
     */
    public CardBean() {
    }

    public String getWord() {
        return strWord;
    }

    public void setWord(String strWord) {
        this.strWord = strWord;
    }

    public String getMeaning() {
        return strMeaning;
    }

    public void setMeaning(String strMeaning) {
        this.strMeaning = strMeaning;
    }

    public String getExample() {
        return strExample;
    }

    public void setExample(String strExample) {
        this.strExample = strExample;
    }

    public String getReading() {
        return strReading;
    }

    public void setReading(String strReading) {
        this.strReading = strReading;
    }

    public String getNote() {
        return strNote == null ? "" : strNote;
    }

    public void setNote(String strNote) {
        this.strNote = strNote;
    }

    public int getLexiconId() {
        return lexiconId;
    }

    public void setLexiconId(int lexiconId) {
        this.lexiconId = lexiconId;
    }
    /******************** Column name ****************/
    /**
     * ID
     */
    public static final String COLUMN_ID = "ID";

    /**
     * Word
     */
    public static final String COLUMN_WORRD = "WORD";

    /**
     * Meaning
     */
    public static final String COLUMN_MEANING = "MEANING";

    /**
     * READING
     */
    public static final String COLUMN_READING = "READING";

    /**
     * EXAMPLE
     */
    public static final String COLUMN_EXAMPLE = "EXAMPLE";

    /**
     * NOTE
     */
    public static final String COLUMN_NOTE = "NOTE";

    public interface Status {
        public static final int NOT_LEARNT = 0;
        public static final int REMEMBERED = 1;
        public static final int NOT_REMEMBERED = 2;
    }

}
